﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="MemberUI.aspx.cs" Inherits="ISSMoviePlex.Admin.Member" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:GridView ID="MemberGridView" runat="server" AllowPaging="True" 
        AutoGenerateColumns="False" CellPadding="4" DataSourceID="MemberDataSource" 
        ForeColor="#333333" GridLines="None" 
        onrowcommand="MemberGridView_RowCommand">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:BoundField DataField="MemberId" HeaderText="MemberId" 
                SortExpression="MemberId" Visible="False" />
            <asp:BoundField DataField="UserProfile.UserName" HeaderText="UserName" 
                SortExpression="UserProfile.UserName" />
            <asp:BoundField DataField="MemberName" HeaderText="Name" 
                SortExpression="MemberName" />
            <asp:BoundField DataField="DateOfBirth" HeaderText="Date of Birth" 
                SortExpression="DateOfBirth" DataFormatString="{0:d}" />
            <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
            <asp:BoundField DataField="Address" HeaderText="Address" 
                SortExpression="Address" />
            <asp:BoundField DataField="MemberState.MemberStateName" HeaderText="Current State" 
                SortExpression="MemberStateId" />
            <asp:BoundField DataField="MoneySpent" HeaderText="Money Spent" 
                SortExpression="MoneySpent" DataFormatString="SGD {0}" />
            <asp:TemplateField HeaderText="Account Status" 
                SortExpression="UserProfile.Status">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" 
                        Text='<%# Bind("UserProfile.Status") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Eval("UserProfile.Status").ToString() == "False" ? "Blocked" : "Normal" %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Block/Unblock">
                <ItemTemplate>
                    <asp:LinkButton runat="server" ID="linkChangeAccountStatus" CommandArgument='<%#Eval("MemberId") %>' CommandName="ChangeAccountStatus">Change</asp:LinkButton>
         </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <EditRowStyle BackColor="#2461BF" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#EFF3FB" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F5F7FB" />
        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
        <SortedDescendingCellStyle BackColor="#E9EBEF" />
        <SortedDescendingHeaderStyle BackColor="#4870BE" />
        
    </asp:GridView>
    <asp:ObjectDataSource ID="MemberDataSource" runat="server" 
        SelectMethod="GetAllMembers" TypeName="ISSMoviePlex.BLL.MemberBLL">
    </asp:ObjectDataSource>
</asp:Content>
